﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RN.ERP.DTO
{
    public class SysSiteCfg
    {
        #region 节点类定义

        /// <summary>
        /// 登录配置。
        /// </summary>
        public class LoginCfg
        {
            /// <summary>
            /// 是否允许用户不插入KEY登录。
            /// </summary>
            public bool AllowLoginWithoutKey { get; set; }

            /// <summary>
            /// 是否允许未办理KEY用户登录。
            /// </summary>
            public bool AllowNoKeyUser { get; set; }
        }

        /// <summary>
        /// 门户网站配置
        /// </summary>
        public class PortalCfg
        {
            private string _webTitle;
            private string _classId;

            /// <summary>
            /// 业务编号
            /// </summary>
            public string ClassId
            {
                get { return _classId; }
                set { _classId = value; }
            }

            /// <summary>
            /// 网站名称
            /// </summary>
            public string WebTitle
            {
                get { return _webTitle; }
                set { _webTitle = value; }
            }
        }

        /// <summary>
        /// 注册配置
        /// </summary>
        public class RegisterCfg
        {
            private string _corpUserType;

            /// <summary>
            /// 企业类别
            /// </summary>
            public string CorpUserType
            {
                get { return _corpUserType; }
                set { _corpUserType = value; }
            }
        }

        /// <summary>
        /// 设置首页的类型。
        /// </summary>
        public class FontPageCfg
        {
            private Dictionary<string, string> _fontPages = new Dictionary<string, string>();

            public Dictionary<string, string> FontPages
            {
                get { return _fontPages; }
                set { _fontPages = value; }
            }
        }

        #endregion

        #region 属性

        private string _areaCode;
        private LoginCfg _loginCfg = new LoginCfg();
        private PortalCfg _portalCfg = new PortalCfg();
        private RegisterCfg _registerCfg = new RegisterCfg();
        private FontPageCfg _fontPageCfg = new FontPageCfg();

        /// <summary>
        /// 首页设置。
        /// </summary>
        public FontPageCfg FontPageConfig
        {
            get { return _fontPageCfg; }
            set { _fontPageCfg = value; }
        }

        /// <summary>
        /// 注册配置
        /// </summary>
        public RegisterCfg RegisterConfig
        {
            get { return _registerCfg; }
            set { _registerCfg = value; }
        }

        /// <summary>
        /// 门户网站配置
        /// </summary>
        public PortalCfg PortalConfig
        {
            get { return _portalCfg; }
            set { _portalCfg = value; }
        }

        /// <summary>
        /// 设置地区号。
        /// </summary>
        public string AreaCode
        {
            get { return _areaCode; }
            set { _areaCode = value; }
        }

        /// <summary>
        /// 登录配置。
        /// </summary>
        public LoginCfg LoginConfig
        {
            get { return _loginCfg; }
            set { _loginCfg = value; }
        }

        #endregion
    }
}
